package string;
/*
StringBuilder非线程安全，
StringBuffer线程安全，功能与StringBuilder一摸一样，运行较慢
 */
public class StringBuilderDemo02 {
    public static void main(String[] args) {
        StringBuilder builder = new StringBuilder("a");
        for(int i=0;i<1000000;i++){
            builder.append("a");
        }
        System.out.println("执行完毕！");//如果用string进行操作，会非常慢且耗性能
    }
}
